<?php

namespace app\admin\model\platform;


/**
 * @author tangsan
 * @package app\admin\model
 */
class GameKindItem extends BaseModel
{
    // 设置数据表名
    protected $table = "GameKindItem";


    public static function getGameAll()
    {
        return GameKindItem::select()->toArray();

    }

    public static function getGame($id)
    {
        if (!$id) {
            return '';
        }
        return GameKindItem::where('KindID', $id)->value('KindName');

    }

    public function roomInfo()
    {
        return $this->hasOne(GameRoomInfo::class,'KindID','KindID');
    }


}